import { SetMetadata } from '@nestjs/common';

export const HAS_PERMI = 'hasPermi';

/**
 * 认证装饰器
 * @param permi 值为字符串时时权限标识，boolean时为是否要权限认证
 * @returns
 */
export const IsAuth = (permi: string | boolean) =>
  SetMetadata(HAS_PERMI, permi);
